package com.lyw.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.lyw.common.utils.PageUtils;
import com.lyw.gulimall.product.entity.CategoryEntity;
import com.lyw.gulimall.product.vo.front.Catalog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author liyawei
 * @email liyawei@gmail.com
 * @date 2022-05-31 11:06:15
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    void batchRemoveByIds(List<Long> asList);

    /**
     * 找到catelogId的完整路径
     * [父/子/孙]
     * @param catelogId
     * @return
     */
    Long[] findCatelogPath(Long catelogId);

    void updateCascade(List<CategoryEntity> asList);

    List<CategoryEntity> getLevel1Categorys();

    Map<Long, List<Catalog2Vo>> getCatalogJson();

}

